/*
 * fixed_buffer.h
 *
 *  Created on: 2016-4-2
 *      Author: ZhangXiyin
 */

#ifndef EYAS_SOURCES_BUFFER_FIXED_BUFFER_H_
#define EYAS_SOURCES_BUFFER_FIXED_BUFFER_H_

#include "impl/buffer_impl.hpp"

namespace eyas {
namespace buffer {

template <int32_t t_slices_length>
class fixed_buffer : public buffer_impl {
public:
	static int32_t Capacity(){
		return t_slices_length;
	}
public:
	fixed_buffer()
	:buffer_impl(_arr, t_slices_length){
	}
	virtual ~fixed_buffer(){
	}
	unsigned char* get_buffer(){
		return _arr;
	}
private:
	unsigned char _arr[t_slices_length];
protected:
	virtual void init(){}
};

} /* namespace thread */
} /* namespace eyas */
#endif /* EYAS_SOURCES_BUFFER_FIXED_BUFFER_H_ */
